package com.example.charstream;

import java.io.FileWriter;
import java.io.IOException;

public class CharStreamDemo6 {
    public static void main(String[] args) throws IOException {

        /**
         * 字符输出流缓冲区
         */

        FileWriter fw = new FileWriter("src/com/example/file/f.txt");

        fw.write("Hello World");
        fw.write("你好 世界");

        /**
         * 刷新缓冲区
         */
        fw.flush();

        fw.write("我是你爹");
        fw.write("别不承认");

        fw.close();
    }
}
